
<!DOCTYPE HTML>
<html lang="en" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>关键概念 · InfluxDB中文文档</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="jasper">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-comment/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="glossary.html" />
    
    
    <link rel="prev" href="./" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="https://legacy.gitbook.com/book/jasper-zhang1/influxdb" target="_blank" class="custom-link">InfluxDB中文文档</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    前言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../Introduction/">
            
                <a href="../Introduction/">
            
                    
                    介绍
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../Introduction/installation.html">
            
                <a href="../Introduction/installation.html">
            
                    
                    安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../Introduction/getting_start.html">
            
                <a href="../Introduction/getting_start.html">
            
                    
                    入门指南
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../Guide/">
            
                <a href="../Guide/">
            
                    
                    使用指南
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../Guide/writing_data.html">
            
                <a href="../Guide/writing_data.html">
            
                    
                    写入数据
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../Guide/querying_data.html">
            
                <a href="../Guide/querying_data.html">
            
                    
                    查询数据
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../Guide/downsampling_and_retention.html">
            
                <a href="../Guide/downsampling_and_retention.html">
            
                    
                    采样和数据保留
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../Guide/hardware_sizing.html">
            
                <a href="../Guide/hardware_sizing.html">
            
                    
                    硬件指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="../Guide/https_setup.html">
            
                <a href="../Guide/https_setup.html">
            
                    
                    HTTPS设置
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="./">
            
                <a href="./">
            
                    
                    概念介绍
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.4.1" data-path="key_concepts.html">
            
                <a href="key_concepts.html">
            
                    
                    关键概念
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="glossary.html">
            
                <a href="glossary.html">
            
                    
                    专业术语
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="crosswalk.html">
            
                <a href="crosswalk.html">
            
                    
                    与SQL比较
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="insights_tradeoffs.html">
            
                <a href="insights_tradeoffs.html">
            
                    
                    InfluxDB的设计见解和权衡
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="schema_and_data_layout.html">
            
                <a href="schema_and_data_layout.html">
            
                    
                    schema设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6" data-path="storage_engine.html">
            
                <a href="storage_engine.html">
            
                    
                    存储引擎
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../Write_protocols/">
            
                <a href="../Write_protocols/">
            
                    
                    写入协议
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../Write_protocols/line_protocol.html">
            
                <a href="../Write_protocols/line_protocol.html">
            
                    
                    行协议
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../Query_language/">
            
                <a href="../Query_language/">
            
                    
                    查询语言
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../Query_language/data_exploration.html">
            
                <a href="../Query_language/data_exploration.html">
            
                    
                    数据查询语法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../Query_language/schema_exploration.html">
            
                <a href="../Query_language/schema_exploration.html">
            
                    
                    schema查询语法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../Query_language/database_management.html">
            
                <a href="../Query_language/database_management.html">
            
                    
                    数据库管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="../Query_language/continuous_queries.html">
            
                <a href="../Query_language/continuous_queries.html">
            
                    
                    连续查询
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" data-path="../Query_language/functions.html">
            
                <a href="../Query_language/functions.html">
            
                    
                    函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6" data-path="../Query_language/math_operators.html">
            
                <a href="../Query_language/math_operators.html">
            
                    
                    数学运算符
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7" data-path="../Query_language/authentication_and_authorization.html">
            
                <a href="../Query_language/authentication_and_authorization.html">
            
                    
                    认证和授权
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../Troubleshooting/">
            
                <a href="../Troubleshooting/">
            
                    
                    故障排除
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../Troubleshooting/faq.html">
            
                <a href="../Troubleshooting/faq.html">
            
                    
                    FAQ
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../Troubleshooting/system_monitor.html">
            
                <a href="../Troubleshooting/system_monitor.html">
            
                    
                    系统监控
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../Troubleshooting/query_management.html">
            
                <a href="../Troubleshooting/query_management.html">
            
                    
                    查询管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4" data-path="../Troubleshooting/error_messages.html">
            
                <a href="../Troubleshooting/error_messages.html">
            
                    
                    错误信息
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >关键概念</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x5173;&#x952E;&#x6982;&#x5FF5;">&#x5173;&#x952E;&#x6982;&#x5FF5;</h1>
<p>&#x5728;&#x6DF1;&#x5165;InfluxDB&#x4E4B;&#x524D;&#xFF0C;&#x6700;&#x597D;&#x662F;&#x4E86;&#x89E3;&#x6570;&#x636E;&#x5E93;&#x7684;&#x4E00;&#x4E9B;&#x5173;&#x952E;&#x6982;&#x5FF5;&#x3002; &#x672C;&#x6587;&#x6863;&#x7B80;&#x8981;&#x4ECB;&#x7ECD;&#x4E86;&#x8FD9;&#x4E9B;&#x6982;&#x5FF5;&#x548C;&#x5E38;&#x7528;&#x7684;InfluxDB&#x672F;&#x8BED;&#x3002; &#x6211;&#x4EEC;&#x5728;&#x4E0B;&#x9762;&#x5217;&#x51FA;&#x4E86;&#x6240;&#x6709;&#x6DB5;&#x76D6;&#x7684;&#x672F;&#x8BED;&#xFF0C;&#x4F46;&#x662F;&#x6211;&#x4EEC;&#x5EFA;&#x8BAE;&#x60A8;&#x4ECE;&#x5934;&#x5230;&#x5C3E;&#x9605;&#x8BFB;&#x672C;&#x6587;&#x6863;&#xFF0C;&#x4EE5;&#x83B7;&#x5F97;&#x5BF9;&#x6211;&#x4EEC;&#x6700;&#x559C;&#x7231;&#x7684;&#x65F6;&#x95F4;&#x5E8F;&#x5217;&#x6570;&#x636E;&#x5E93;&#x7684;&#x66F4;&#x5168;&#x9762;&#x4E86;&#x89E3;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:center"><strong>database</strong></th>
<th style="text-align:center"><strong>field key</strong></th>
<th style="text-align:center"><strong>field set</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center"><strong>field value</strong></td>
<td style="text-align:center"><strong>measurement</strong></td>
<td style="text-align:center"><strong>point</strong></td>
</tr>
<tr>
<td style="text-align:center"><strong>retention policy</strong></td>
<td style="text-align:center"><strong>series</strong></td>
<td style="text-align:center"><strong>tag key</strong></td>
</tr>
<tr>
<td style="text-align:center"><strong>tag set</strong></td>
<td style="text-align:center"><strong>tag value</strong></td>
<td style="text-align:center"><strong>timestamp</strong></td>
</tr>
</tbody>
</table>
<h2 id="&#x793A;&#x4F8B;&#x6570;&#x636E;">&#x793A;&#x4F8B;&#x6570;&#x636E;</h2>
<p>&#x4E0B;&#x4E00;&#x8282;&#x5C06;&#x53C2;&#x8003;&#x4E0B;&#x9762;&#x5217;&#x51FA;&#x7684;&#x6570;&#x636E;&#x3002; &#x867D;&#x7136;&#x6570;&#x636E;&#x662F;&#x4F2A;&#x9020;&#x7684;&#xFF0C;&#x4F46;&#x5728;InfluxDB&#x4E2D;&#x662F;&#x4E00;&#x4E2A;&#x5F88;&#x901A;&#x7528;&#x7684;&#x573A;&#x666F;&#x3002; &#x6570;&#x636E;&#x5C55;&#x793A;&#x4E86;&#x5728;2015&#x5E74;8&#x6708;18&#x65E5;&#x5348;&#x591C;&#x81F3;2015&#x5E74;8&#x6708;18&#x65E5;&#x4E0A;&#x5348;6&#x65F6;12&#x5206;&#x5728;&#x4E24;&#x4E2A;&#x5730;&#x70B9;<code>location</code>&#xFF08;&#x5730;&#x70B9;<code>1</code>&#x548C;&#x5730;&#x70B9;<code>2</code>&#xFF09;&#x663E;&#x793A;&#x4E24;&#x540D;&#x79D1;&#x5B66;&#x5BB6;<code>scientists</code>&#xFF08;<code>langstroth</code>&#x548C;<code>perpetua</code>&#xFF09;&#x8BA1;&#x6570;&#x7684;&#x8774;&#x8776;(<code>butterflies</code>)&#x548C;&#x871C;&#x8702;(<code>honeybees</code>)&#x6570;&#x91CF;&#x3002; &#x5047;&#x8BBE;&#x6570;&#x636E;&#x5B58;&#x5728;&#x540D;&#x4E3A;<code>my_database</code>&#x7684;&#x6570;&#x636E;&#x5E93;&#x4E2D;&#xFF0C;&#x800C;&#x4E14;&#x5B58;&#x50A8;&#x7B56;&#x7565;&#x662F;<code>autogen</code>&#x3002;</p>
<pre><code>name: census
-&#x2014;&#x2014;&#x2014;&#x2014;&#x2014;&#x2014;&#x2014;&#x2014;&#x2014;&#x2014;&#x2014;&#x2014;
time                                      butterflies     honeybees     location     scientist
2015-08-18T00:00:00Z      12                   23                    1                 langstroth
2015-08-18T00:00:00Z      1                     30                    1                 perpetua
2015-08-18T00:06:00Z      11                   28                    1                 langstroth
2015-08-18T00:06:00Z   3                     28                    1                 perpetua
2015-08-18T05:54:00Z      2                     11                    2                 langstroth
2015-08-18T06:00:00Z      1                     10                    2                 langstroth
2015-08-18T06:06:00Z      8                     23                    2                 perpetua
2015-08-18T06:12:00Z      7                     22                    2                 perpetua
</code></pre><p>&#x5176;&#x4E2D;census&#x662F;<code>measurement</code>&#xFF0C;butterflies&#x548C;honeybees&#x662F;<code>field key</code>&#xFF0C;location&#x548C;scientist&#x662F;<code>tag key</code>&#x3002;</p>
<h2 id="&#x8BA8;&#x8BBA;">&#x8BA8;&#x8BBA;</h2>
<p>&#x73B0;&#x5728;&#x60A8;&#x5DF2;&#x7ECF;&#x5728;InfluxDB&#x4E2D;&#x770B;&#x5230;&#x4E86;&#x4E00;&#x4E9B;&#x793A;&#x4F8B;&#x6570;&#x636E;&#xFF0C;&#x672C;&#x8282;&#x5C06;&#x8BE6;&#x7EC6;&#x5206;&#x6790;&#x8FD9;&#x4E9B;&#x6570;&#x636E;&#x3002;</p>
<p>InfluxDB&#x662F;&#x4E00;&#x4E2A;&#x65F6;&#x95F4;&#x5E8F;&#x5217;&#x6570;&#x636E;&#x5E93;&#xFF0C;&#x56E0;&#x6B64;&#x6211;&#x4EEC;&#x5F00;&#x59CB;&#x4E00;&#x5207;&#x7684;&#x6839;&#x6E90;&#x5C31;&#x662F;&#x2014;&#x2014;&#x65F6;&#x95F4;&#x3002;&#x5728;&#x4E0A;&#x9762;&#x7684;&#x6570;&#x636E;&#x4E2D;&#x6709;&#x4E00;&#x5217;&#x662F;<code>time</code>&#xFF0C;&#x5728;InfluxDB&#x4E2D;&#x6240;&#x6709;&#x7684;&#x6570;&#x636E;&#x90FD;&#x6709;&#x8FD9;&#x4E00;&#x5217;&#x3002;<code>time</code>&#x5B58;&#x7740;&#x65F6;&#x95F4;&#x6233;&#xFF0C;&#x8FD9;&#x4E2A;&#x65F6;&#x95F4;&#x6233;&#x4EE5;<a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>&#x683C;&#x5F0F;&#x5C55;&#x793A;&#x4E86;&#x4E0E;&#x7279;&#x5B9A;&#x6570;&#x636E;&#x76F8;&#x5173;&#x8054;&#x7684;UTC&#x65E5;&#x671F;&#x548C;&#x65F6;&#x95F4;&#x3002;</p>
<p>&#x63A5;&#x4E0B;&#x6765;&#x4E24;&#x4E2A;&#x5217;&#x53EB;&#x4F5C;<code>butterflies</code>&#x548C;<code>honeybees</code>&#xFF0C;&#x79F0;&#x4E3A;fields&#x3002;fields&#x7531;field key&#x548C;field value&#x7EC4;&#x6210;&#x3002;field key(<code>butterflies</code>&#x548C;<code>honeybees</code>)&#x90FD;&#x662F;&#x5B57;&#x7B26;&#x4E32;&#xFF0C;&#x4ED6;&#x4EEC;&#x5B58;&#x50A8;&#x5143;&#x6570;&#x636E;&#xFF1B;field key <code>butterflies</code>&#x544A;&#x8BC9;&#x6211;&#x4EEC;&#x8774;&#x8776;&#x7684;&#x8BA1;&#x6570;&#x4ECE;12&#x5230;7&#xFF1B;field key <code>honeybees</code>&#x544A;&#x8BC9;&#x6211;&#x4EEC;&#x871C;&#x8702;&#x7684;&#x8BA1;&#x6570;&#x4ECE;23&#x53D8;&#x5230;22&#x3002;</p>
<p>field value&#x5C31;&#x662F;&#x4F60;&#x7684;&#x6570;&#x636E;&#xFF0C;&#x5B83;&#x4EEC;&#x53EF;&#x4EE5;&#x662F;&#x5B57;&#x7B26;&#x4E32;&#x3001;&#x6D6E;&#x70B9;&#x6570;&#x3001;&#x6574;&#x6570;&#x3001;&#x5E03;&#x5C14;&#x503C;&#xFF0C;&#x56E0;&#x4E3A;InfluxDB&#x662F;&#x65F6;&#x95F4;&#x5E8F;&#x5217;&#x6570;&#x636E;&#x5E93;&#xFF0C;&#x6240;&#x4EE5;field value&#x603B;&#x662F;&#x548C;&#x65F6;&#x95F4;&#x6233;&#x76F8;&#x5173;&#x8054;&#x3002;</p>
<p>&#x5728;&#x793A;&#x4F8B;&#x4E2D;&#xFF0C;field value&#x5982;&#x4E0B;&#xFF1A;</p>
<pre><code>12   23
1    30
11   28
3    28
2    11
1    10
8    23
7    22
</code></pre><p>&#x5728;&#x4E0A;&#x9762;&#x7684;&#x6570;&#x636E;&#x4E2D;&#xFF0C;&#x6BCF;&#x7EC4;field key&#x548C;field value&#x7684;&#x96C6;&#x5408;&#x7EC4;&#x6210;&#x4E86;<code>field set</code>&#xFF0C;&#x5728;&#x793A;&#x4F8B;&#x6570;&#x636E;&#x4E2D;&#xFF0C;&#x6709;&#x516B;&#x4E2A;<code>field set</code>&#xFF1A;</p>
<pre><code>butterflies = 12 honeybees = 23
butterflies = 1 honeybees = 30
butterflies = 11 honeybees = 28
butterflies = 3 honeybees = 28
butterflies = 2 honeybees = 11
butterflies = 1 honeybees = 10
butterflies = 8 honeybees = 23
butterflies = 7 honeybees = 22
</code></pre><p>field&#x662F;InfluxDB&#x6570;&#x636E;&#x7ED3;&#x6784;&#x6240;&#x5FC5;&#x9700;&#x7684;&#x4E00;&#x90E8;&#x5206;&#x2014;&#x2014;&#x5728;InfluxDB&#x4E2D;&#x4E0D;&#x80FD;&#x6CA1;&#x6709;field&#x3002;&#x8FD8;&#x8981;&#x6CE8;&#x610F;&#xFF0C;field&#x662F;&#x6CA1;&#x6709;&#x7D22;&#x5F15;&#x7684;&#x3002;&#x5982;&#x679C;&#x4F7F;&#x7528;field value&#x4F5C;&#x4E3A;&#x8FC7;&#x6EE4;&#x6761;&#x4EF6;&#x6765;&#x67E5;&#x8BE2;&#xFF0C;&#x5219;&#x5FC5;&#x987B;&#x626B;&#x63CF;&#x5176;&#x4ED6;&#x6761;&#x4EF6;&#x5339;&#x914D;&#x540E;&#x7684;&#x6240;&#x6709;&#x503C;&#x3002;&#x56E0;&#x6B64;&#xFF0C;&#x8FD9;&#x4E9B;&#x67E5;&#x8BE2;&#x76F8;&#x5BF9;&#x4E8E;tag&#x4E0A;&#x7684;&#x67E5;&#x8BE2;&#xFF08;&#x4E0B;&#x6587;&#x4F1A;&#x4ECB;&#x7ECD;tag&#x7684;&#x67E5;&#x8BE2;&#xFF09;&#x6027;&#x80FD;&#x4F1A;&#x4F4E;&#x5F88;&#x591A;&#x3002; &#x4E00;&#x822C;&#x6765;&#x8BF4;&#xFF0C;&#x5B57;&#x6BB5;&#x4E0D;&#x5E94;&#x5305;&#x542B;&#x5E38;&#x7528;&#x6765;&#x67E5;&#x8BE2;&#x7684;&#x5143;&#x6570;&#x636E;&#x3002;</p>
<p>&#x6837;&#x672C;&#x6570;&#x636E;&#x4E2D;&#x7684;&#x6700;&#x540E;&#x4E24;&#x5217;&#xFF08;<code>location</code>&#x548C;<code>scientist</code>&#xFF09;&#x5C31;&#x662F;tag&#x3002; tag&#x7531;tag key&#x548C;tag value&#x7EC4;&#x6210;&#x3002;tag key&#x548C;tag value&#x90FD;&#x4F5C;&#x4E3A;&#x5B57;&#x7B26;&#x4E32;&#x5B58;&#x50A8;&#xFF0C;&#x5E76;&#x8BB0;&#x5F55;&#x5728;&#x5143;&#x6570;&#x636E;&#x4E2D;&#x3002;&#x793A;&#x4F8B;&#x6570;&#x636E;&#x4E2D;&#x7684;tag key&#x662F;<code>location</code>&#x548C;<code>scientist</code>&#x3002; <code>location</code>&#x6709;&#x4E24;&#x4E2A;tag value&#xFF1A;<code>1</code>&#x548C;<code>2</code>&#x3002;<code>scientist</code>&#x8FD8;&#x6709;&#x4E24;&#x4E2A;tag value&#xFF1A;<code>langstroth</code>&#x548C;<code>perpetua</code>&#x3002;</p>
<p>&#x5728;&#x4E0A;&#x9762;&#x7684;&#x6570;&#x636E;&#x4E2D;&#xFF0C;tag set&#x662F;&#x4E0D;&#x540C;&#x7684;&#x6BCF;&#x7EC4;tag key&#x548C;tag value&#x7684;&#x96C6;&#x5408;&#xFF0C;&#x793A;&#x4F8B;&#x6570;&#x636E;&#x91CC;&#x6709;&#x56DB;&#x4E2A;tag set&#xFF1A;</p>
<pre><code>location = 1, scientist = langstroth
location = 2, scientist = langstroth
location = 1, scientist = perpetua
location = 2, scientist = perpetua
</code></pre><p>tag&#x4E0D;&#x662F;&#x5FC5;&#x9700;&#x7684;&#x5B57;&#x6BB5;&#xFF0C;&#x4F46;&#x662F;&#x5728;&#x4F60;&#x7684;&#x6570;&#x636E;&#x4E2D;&#x4F7F;&#x7528;tag&#x603B;&#x662F;&#x5927;&#x6709;&#x88E8;&#x76CA;&#xFF0C;&#x56E0;&#x4E3A;&#x4E0D;&#x540C;&#x4E8E;field&#xFF0C; tag&#x662F;&#x7D22;&#x5F15;&#x8D77;&#x6765;&#x7684;&#x3002;&#x8FD9;&#x610F;&#x5473;&#x7740;&#x5BF9;tag&#x7684;&#x67E5;&#x8BE2;&#x66F4;&#x5FEB;&#xFF0C;tag&#x662F;&#x5B58;&#x50A8;&#x5E38;&#x7528;&#x5143;&#x6570;&#x636E;&#x7684;&#x6700;&#x4F73;&#x9009;&#x62E9;&#x3002;</p>
<blockquote>
<h4 id="&#x4E0D;&#x540C;&#x573A;&#x666F;&#x4E0B;&#x7684;&#x6570;&#x636E;&#x7ED3;&#x6784;&#x8BBE;&#x8BA1;">&#x4E0D;&#x540C;&#x573A;&#x666F;&#x4E0B;&#x7684;&#x6570;&#x636E;&#x7ED3;&#x6784;&#x8BBE;&#x8BA1;</h4>
<p>&#x5982;&#x679C;&#x4F60;&#x8BF4;&#x4F60;&#x7684;&#x5927;&#x90E8;&#x5206;&#x7684;&#x67E5;&#x8BE2;&#x96C6;&#x4E2D;&#x5728;&#x5B57;&#x6BB5;<code>honeybees</code>&#x548C;<code>butterflies</code>&#x4E0A;&#xFF1A;</p>
<pre><code>SELECT * FROM &quot;census&quot; WHERE &quot;butterflies&quot; = 1
SELECT * FROM &quot;census&quot; WHERE &quot;honeybees&quot; = 23
</code></pre><p>&#x56E0;&#x4E3A;field&#x662F;&#x6CA1;&#x6709;&#x7D22;&#x5F15;&#x7684;&#xFF0C;&#x5728;&#x7B2C;&#x4E00;&#x4E2A;&#x67E5;&#x8BE2;&#x91CC;&#x9762;InfluxDB&#x4F1A;&#x626B;&#x63CF;&#x6240;&#x6709;&#x7684;<code>butterflies</code>&#x7684;&#x503C;&#xFF0C;&#x7B2C;&#x4E8C;&#x4E2A;&#x67E5;&#x8BE2;&#x4F1A;&#x626B;&#x63CF;&#x6240;&#x6709;<code>honeybees</code>&#x7684;&#x503C;&#x3002;&#x8FD9;&#x6837;&#x4F1A;&#x4F7F;&#x8BF7;&#x6C42;&#x65F6;&#x95F4;&#x5F88;&#x957F;&#xFF0C;&#x7279;&#x522B;&#x5728;&#x89C4;&#x6A21;&#x5F88;&#x5927;&#x65F6;&#x3002;&#x4E3A;&#x4E86;&#x4F18;&#x5316;&#x4F60;&#x7684;&#x67E5;&#x8BE2;&#xFF0C;&#x4F60;&#x5E94;&#x8BE5;&#x91CD;&#x65B0;&#x8BBE;&#x8BA1;&#x4F60;&#x7684;&#x6570;&#x636E;&#x7ED3;&#x679C;&#xFF0C;&#x628A;field(<code>butterflies</code>&#x548C;<code>honeybees</code>)&#x6539;&#x4E3A;tag&#xFF0C;&#x800C;&#x5C06;tag&#xFF08;<code>location</code>&#x548C;<code>scientist</code>&#xFF09;&#x6539;&#x4E3A;field&#x3002;</p>
<pre><code>name: census
-&#x2014;&#x2014;&#x2014;&#x2014;&#x2014;&#x2014;&#x2014;&#x2014;&#x2014;&#x2014;&#x2014;&#x2014;
time                                      location     scientist      butterflies     honeybees
2015-08-18T00:00:00Z      1                 langstroth    12                   23
2015-08-18T00:00:00Z      1                 perpetua      1                     30
2015-08-18T00:06:00Z      1                 langstroth    11                   28
2015-08-18T00:06:00Z   1                 perpetua      3                     28
2015-08-18T05:54:00Z      2                 langstroth    2                     11
2015-08-18T06:00:00Z      2                 langstroth    1                     10
2015-08-18T06:06:00Z      2                 perpetua      8                     23
2015-08-18T06:12:00Z      2                 perpetua      7                     22
</code></pre><p>&#x73B0;&#x5728;<code>butterflies</code>&#x548C;<code>honeybees</code>&#x662F;tag&#x4E86;&#xFF0C;&#x5F53;&#x4F60;&#x518D;&#x7528;&#x4E0A;&#x9762;&#x7684;&#x67E5;&#x8BE2;&#x8BED;&#x53E5;&#x65F6;&#xFF0C;&#x5C31;&#x4E0D;&#x4F1A;&#x626B;&#x63CF;&#x6240;&#x6709;&#x7684;&#x503C;&#x4E86;&#xFF0C;&#x8FD9;&#x4E5F;&#x610F;&#x5473;&#x7740;&#x67E5;&#x8BE2;&#x66F4;&#x5FEB;&#x4E86;&#x3002;</p>
</blockquote>
<p>measurement&#x4F5C;&#x4E3A;tag&#xFF0C;fields&#x548C;time&#x5217;&#x7684;&#x5BB9;&#x5668;&#xFF0C;measurement&#x7684;&#x540D;&#x5B57;&#x662F;&#x5B58;&#x50A8;&#x5728;&#x76F8;&#x5173;fields&#x6570;&#x636E;&#x7684;&#x63CF;&#x8FF0;&#x3002; measurement&#x7684;&#x540D;&#x5B57;&#x662F;&#x5B57;&#x7B26;&#x4E32;&#xFF0C;&#x5BF9;&#x4E8E;&#x4E00;&#x4E9B;SQL&#x7528;&#x6237;&#xFF0C;measurement&#x5728;&#x6982;&#x5FF5;&#x4E0A;&#x7C7B;&#x4F3C;&#x4E8E;&#x8868;&#x3002;&#x6837;&#x672C;&#x6570;&#x636E;&#x4E2D;&#x552F;&#x4E00;&#x7684;&#x6D4B;&#x91CF;&#x662F;<code>census</code>&#x3002; &#x540D;&#x79F0;<code>census</code>&#x544A;&#x8BC9;&#x6211;&#x4EEC;&#xFF0C;fields&#x503C;&#x8BB0;&#x5F55;&#x4E86;<code>butterflies</code>&#x548C;<code>honeybees</code>&#x7684;&#x6570;&#x91CF;&#xFF0C;&#x800C;&#x4E0D;&#x662F;&#x4E0D;&#x662F;&#x5B83;&#x4EEC;&#x7684;&#x5927;&#x5C0F;&#xFF0C;&#x65B9;&#x5411;&#x6216;&#x67D0;&#x79CD;&#x5E78;&#x798F;&#x6307;&#x6570;&#x3002; </p>
<p>&#x5355;&#x4E2A;measurement&#x53EF;&#x4EE5;&#x6709;&#x4E0D;&#x540C;&#x7684;retention policy&#x3002; retention policy&#x63CF;&#x8FF0;&#x4E86;InfluxDB&#x4FDD;&#x5B58;&#x6570;&#x636E;&#x7684;&#x65F6;&#x95F4;&#xFF08;DURATION&#xFF09;&#x4EE5;&#x53CA;&#x8FD9;&#x4E9B;&#x5B58;&#x50A8;&#x5728;&#x96C6;&#x7FA4;&#x4E2D;&#x6570;&#x636E;&#x7684;&#x526F;&#x672C;&#x6570;&#x91CF;&#xFF08;REPLICATION&#xFF09;&#x3002; &#x5982;&#x679C;&#x60A8;&#x6709;&#x5174;&#x8DA3;&#x9605;&#x8BFB;&#x6709;&#x5173;retention policy&#x7684;&#x66F4;&#x591A;&#x4FE1;&#x606F;&#xFF0C;&#x8BF7;&#x67E5;&#x770B;<a href="">&#x6570;&#x636E;&#x5E93;&#x7BA1;&#x7406;</a>&#x7AE0;&#x8282;&#x3002;</p>
<blockquote>
<p>&#x6CE8;&#x610F;&#xFF1A;&#x5728;&#x5355;&#x8282;&#x70B9;&#x7684;&#x5B9E;&#x4F8B;&#x4E0B;&#xFF0C;Replication&#x7CFB;&#x6570;&#x4E0D;&#x7BA1;&#x7528;&#x3002;</p>
</blockquote>
<p>&#x5728;&#x6837;&#x672C;&#x6570;&#x636E;&#x4E2D;&#xFF0C;measurement <code>census</code>&#x4E2D;&#x7684;&#x6240;&#x6709;&#x5185;&#x5BB9;&#x90FD;&#x5C5E;&#x4E8E;<code>autogen</code>&#x7684;retention policy&#x3002; InfluxDB&#x81EA;&#x52A8;&#x521B;&#x5EFA;&#x8BE5;&#x5B58;&#x50A8;&#x7B56;&#x7565;; &#x5B83;&#x5177;&#x6709;&#x65E0;&#x9650;&#x7684;&#x6301;&#x7EED;&#x65F6;&#x95F4;&#x548C;&#x590D;&#x5236;&#x56E0;&#x5B50;&#x8BBE;&#x7F6E;&#x4E3A;1&#x3002;</p>
<p>&#x73B0;&#x5728;&#x4F60;&#x5DF2;&#x7ECF;&#x719F;&#x6089;&#x4E86;measurement&#xFF0C;tag set&#x548C;retention policy&#xFF0C;&#x90A3;&#x4E48;&#x73B0;&#x5728;&#x662F;&#x8BA8;&#x8BBA;series&#x7684;&#x65F6;&#x5019;&#x4E86;&#x3002; &#x5728;InfluxDB&#x4E2D;&#xFF0C;series&#x662F;&#x5171;&#x540C;retention policy&#xFF0C;measurement&#x548C;tag set&#x7684;&#x96C6;&#x5408;&#x3002; &#x4EE5;&#x4E0A;&#x6570;&#x636E;&#x7531;&#x56DB;&#x4E2A;series&#x7EC4;&#x6210;&#xFF1A;</p>
<table>
<thead>
<tr>
<th>&#x4EFB;&#x610F;series&#x7F16;&#x53F7;</th>
<th>retention policy</th>
<th>measurement</th>
<th>tag set</th>
</tr>
</thead>
<tbody>
<tr>
<td>series 1</td>
<td><code>autogen</code></td>
<td><code>census</code></td>
<td><code>location = 1,scientist = langstroth</code></td>
</tr>
<tr>
<td>series 2</td>
<td><code>autogen</code></td>
<td><code>census</code></td>
<td><code>location = 2,scientist = langstroth</code></td>
</tr>
<tr>
<td>series 3</td>
<td><code>autogen</code></td>
<td><code>census</code></td>
<td><code>location = 1,scientist = perpetua</code></td>
</tr>
<tr>
<td>series 4</td>
<td><code>autogen</code></td>
<td><code>census</code></td>
<td><code>location = 2,scientist = perpetua</code></td>
</tr>
</tbody>
</table>
<p>&#x7406;&#x89E3;series&#x5BF9;&#x4E8E;&#x8BBE;&#x8BA1;&#x6570;&#x636E;schema&#x4EE5;&#x53CA;&#x5BF9;&#x4E8E;&#x5904;&#x7406;InfluxDB&#x91CC;&#x9762;&#x7684;&#x6570;&#x636E;&#x90FD;&#x662F;&#x5F88;&#x6709;&#x5FC5;&#x8981;&#x7684;&#x3002;</p>
<p>&#x6700;&#x540E;&#xFF0C;point&#x5C31;&#x662F;&#x5177;&#x6709;&#x76F8;&#x540C;timestamp&#x7684;&#x76F8;&#x540C;series&#x7684;field&#x96C6;&#x5408;&#x3002;&#x4F8B;&#x5982;&#xFF0C;&#x8FD9;&#x5C31;&#x662F;&#x4E00;&#x4E2A;point&#xFF1A;</p>
<pre><code>name: census
-----------------
time                           butterflies     honeybees     location     scientist
2015-08-18T00:00:00Z     1                  30               1               perpetua
</code></pre><p>&#x4F8B;&#x5B50;&#x91CC;&#x7684;series&#x7684;retention policy&#x4E3A;<code>autogen</code>&#xFF0C;measurement&#x4E3A;<code>census</code>&#xFF0C;tag set&#x4E3A;<code>location = 1, scientist = perpetua</code>&#x3002;point&#x7684;timestamp&#x4E3A;<code>2015-08-18T00:00:00Z</code>&#x3002;</p>
<p>&#x6211;&#x4EEC;&#x521A;&#x521A;&#x6DB5;&#x76D6;&#x7684;&#x6240;&#x6709;&#x5185;&#x5BB9;&#x90FD;&#x5B58;&#x50A8;&#x5728;&#x6570;&#x636E;&#x5E93;&#xFF08;database&#xFF09;&#x4E2D;&#x2014;&#x2014;&#x793A;&#x4F8B;&#x6570;&#x636E;&#x4F4D;&#x4E8E;&#x6570;&#x636E;&#x5E93;<code>my_database</code>&#x4E2D;&#x3002; InfluxDB&#x6570;&#x636E;&#x5E93;&#x4E0E;&#x4F20;&#x7EDF;&#x7684;&#x5173;&#x7CFB;&#x6570;&#x636E;&#x5E93;&#x7C7B;&#x4F3C;&#xFF0C;&#x5E76;&#x4F5C;&#x4E3A;users&#xFF0C;retention policy&#xFF0C;continuous&#x4EE5;&#x53CA;point&#x7684;&#x903B;&#x8F91;&#x4E0A;&#x7684;&#x5BB9;&#x5668;&#x3002; &#x6709;&#x5173;&#x8FD9;&#x4E9B;&#x4E3B;&#x9898;&#x7684;&#x66F4;&#x591A;&#x4FE1;&#x606F;&#xFF0C;&#x8BF7;&#x53C2;&#x9605;<a href="">&#x8EAB;&#x4EFD;&#x9A8C;&#x8BC1;&#x548C;&#x6388;&#x6743;</a>&#x548C;<a href="">&#x8FDE;&#x7EED;&#x67E5;&#x8BE2;(continuous query)</a>&#x3002;</p>
<p>&#x6570;&#x636E;&#x5E93;&#x53EF;&#x4EE5;&#x6709;&#x591A;&#x4E2A;users&#xFF0C;retention policy&#xFF0C;continuous&#x548C;measurement&#x3002; InfluxDB&#x662F;&#x4E00;&#x4E2A;&#x65E0;&#x6A21;&#x5F0F;&#x6570;&#x636E;&#x5E93;&#xFF0C;&#x610F;&#x5473;&#x7740;&#x53EF;&#x4EE5;&#x968F;&#x65F6;&#x6DFB;&#x52A0;&#x65B0;&#x7684;measurement&#xFF0C;tag&#x548C;field&#x3002; &#x5B83;&#x65E8;&#x5728;&#x4F7F;&#x65F6;&#x95F4;&#x5E8F;&#x5217;&#x6570;&#x636E;&#x7684;&#x5DE5;&#x4F5C;&#x53D8;&#x5F97;&#x975E;&#x5E38;&#x68D2;&#x3002;</p>
<p>&#x4F60;&#x505A;&#x5230;&#x4E86;&#xFF01;&#x4F60;&#x5DF2;&#x7ECF;&#x77E5;&#x9053;&#x4E86;InfluxDB&#x4E2D;&#x7684;&#x57FA;&#x672C;&#x6982;&#x5FF5;&#x548C;&#x672F;&#x8BED;&#x3002;&#x5982;&#x679C;&#x4F60;&#x662F;&#x521D;&#x5B66;&#x8005;&#xFF0C;&#x6211;&#x4EEC;&#x5EFA;&#x8BAE;&#x60A8;&#x67E5;&#x770B;<a href="../Introduction/getting_start.html">&#x5165;&#x95E8;&#x6307;&#x5357;</a>&#x548C;<a href="../Guide/writing_data.html">&#x5199;&#x5165;&#x6570;&#x636E;</a>&#x548C;<a href="../Guide/querying_data.html">&#x67E5;&#x8BE2;&#x6570;&#x636E;</a>&#x6307;&#x5357;&#x3002; &#x613F;&#x6211;&#x4EEC;&#x7684;&#x65F6;&#x95F4;&#x5E8F;&#x5217;&#x6570;&#x636E;&#x5E93;&#x53EF;&#x4EE5;&#x4E3A;&#x60A8;&#x670D;&#x52A1;&#x1F554;&#x3002;</p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="./" class="navigation navigation-prev " aria-label="Previous page: 概念介绍">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="glossary.html" class="navigation navigation-next " aria-label="Next page: 专业术语">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"关键概念","level":"1.4.1","depth":2,"next":{"title":"专业术语","level":"1.4.2","depth":2,"path":"Concepts/glossary.md","ref":"Concepts/glossary.md","articles":[]},"previous":{"title":"概念介绍","level":"1.4","depth":1,"path":"Concepts/index.md","ref":"Concepts/index.md","articles":[{"title":"关键概念","level":"1.4.1","depth":2,"path":"Concepts/key_concepts.md","ref":"Concepts/key_concepts.md","articles":[]},{"title":"专业术语","level":"1.4.2","depth":2,"path":"Concepts/glossary.md","ref":"Concepts/glossary.md","articles":[]},{"title":"与SQL比较","level":"1.4.3","depth":2,"path":"Concepts/crosswalk.md","ref":"Concepts/crosswalk.md","articles":[]},{"title":"InfluxDB的设计见解和权衡","level":"1.4.4","depth":2,"path":"Concepts/insights_tradeoffs.md","ref":"Concepts/insights_tradeoffs.md","articles":[]},{"title":"schema设计","level":"1.4.5","depth":2,"path":"Concepts/schema_and_data_layout.md","ref":"Concepts/schema_and_data_layout.md","articles":[]},{"title":"存储引擎","level":"1.4.6","depth":2,"path":"Concepts/storage_engine.md","ref":"Concepts/storage_engine.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":["comment"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"comment":{"highlightCommented":true},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"github":"jasper-zhang/influxdb-document-cn","theme":"default","author":"jasper","pdf":{"pageNumbers":true,"fontSize":16,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"InfluxDB中文文档","language":"en","links":{"sidebar":{"InfluxDB中文文档":"https://legacy.gitbook.com/book/jasper-zhang1/influxdb"},"gitbook":true},"gitbook":"*","description":""},"file":{"path":"Concepts/key_concepts.md","mtime":"2019-09-29T09:05:38.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-09-29T09:10:37.143Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-comment/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

